sgdk: genres.h Source File

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

genres.h

    00001 #ifndef GENRES_H_
    00002 #define GENRES_H_
    00003
    00004
    00009 struct genresTiles
    00010 {
    00011         u16 *pal;               //pointer to pal data
    00012         u32 *tiles;             //pointer to tiles data
    00013         u16 width;              //width in tiles
    00014         u16 height;             //height in tiles
    00015         u16 compressedSize; //0 in this demo, more coming soon
    00016 };
    00017
    00018
    00029 struct genresSprites
    00030 {
    00031         u16 *pal;               //pointer to pal data
    00032         u32 **sprites;          //pointer to sprites data
    00033         u16 count;              //nb sprites
    00034         u16 width;              //width of each sprite in pixels
    00035         u16 height;             //height of each sprite in pixels
    00036         u16 size;               //since we use width/height in pixel, useful info on sprite size
    00037         //TODO : size is not SGDK compliant, you need to use size>>8
    00038 };
    00039
    00040
    00041 //ANIMATION
    00042 struct animSpriteInfo{
    00043         u16     idx;
    00044         u8      x,y; // upon frame upper left
    00045 };
    00046
    00047 struct animFrame {
    00048         u16     nbSprites;
    00049         struct  animSpriteInfo  *sprites;
    00050
    00051         u8      timer;
    00052         u8      nextFrameIdx;
    00053 };
    00054
    00055 struct genresAnimation {
    00056         u16     *pal;
    00057         u16     width, height;
    00058
    00059         //frame data
    00060         u16     nbFrames;
    00061         struct  animFrame               **frames;
    00062
    00063         //sprite data
    00064         u8      sprite_width;
    00065         u8      sprite_height;
    00066         u16 nbTiles;
    00067         u16     *sprite_data;
    00068 };
    00069
    00070 //PAL
    00071 //typedef u16   genresPal[16];
    00072 struct genresPal {
    00073         u16 color[16];
    00074 };
    00075
    00076
    00077 #endif /* GENRES_H_ */

All Classes Files Functions Variables Typedefs Enumerations Defines